public class Main {
    public static void main(String[] args) {
        Person Student = new Student("小明");
        Person Teacher = new Teacher("孙老师");
        Student.performAction();
        Teacher.performAction();
        if (Student instanceof Student){
            Student student = (Student) Student;
            student.study();
        }
        if (Teacher instanceof Teacher) {
            Teacher realTeacher = (Teacher) Teacher;
            realTeacher.paigaihomework();
        }
    }
}